import { IFormModuleType } from "@/components/form-module/type/type";
import { IShowTableConfigType } from "@/components/show-table/type/type";
export const queryFormItems: IFormModuleType[] = [
  {
    param: "name",
    label: "商品名称",
    placeholder: "请输入商品名称",
    type: "input"
  },
  {
    param: "address",
    label: "生产地",
    placeholder: "请输入生产地",
    type: "input"
  },
  {
    param: "createAt",
    label: "创建时间",
    type: "datePicker",
    colLayout: {
      xl: 12,
      lg: 12,
      md: 16,
      sm: 24,
      xs: 24
    },
    datePickerProp: {
      type: "daterange",
      rangeSeparator: "至",
      startPlaceholder: "开始时间",
      endPlaceholder: "结束时间"
    }
  },
  {
    param: "status",
    label: "商品状态",
    type: "select",
    placeholder: "请选择商品状态",
    selectOptions: [
      {
        label: "在售",
        value: 1
      },
      {
        label: "停售",
        value: 0
      }
    ]
  }
];

export const goodsListTableConfig: IShowTableConfigType[] = [
  {
    prop: "name",
    label: "商品名称"
  },
  {
    prop: "imgUrl",
    label: "商品图片",
    minWidth: "80px"
  },
  {
    prop: "address",
    label: "生产地",
    minWidth: "80px"
  },
  {
    prop: "inventoryCount",
    label: "库存量",
    minWidth: "80px"
  },
  {
    prop: "saleCount",
    label: "已售数量",
    minWidth: "80px"
  },
  {
    prop: "oldPrice",
    label: "原价/元",
    minWidth: "80px"
  },
  {
    prop: "newPrice",
    label: "现价/元",
    minWidth: "80px"
  },
  {
    prop: "createAt",
    label: "创建时间",
    minWidth: "150px"
  },
  {
    prop: "updateAt",
    label: "更新时间",
    minWidth: "150px"
  },
  {
    prop: "status",
    label: "商品状态",
    minWidth: "80px"
  },
  {
    prop: "handle",
    label: "操作",
    minWidth: "180px"
  }
];
